package com.atdel.demo24;


import java.util.Date;

/**
 * @BelongsProject: java_study
 * @BelongsPackage: com.atdel.demo24
 * @Author: Del
 * @CreateTime: 2025-03-19  10:20
 * @Description: TODO
 * @Version: 1.0
 */

@Entity(table = "user_info")
public class UserInfo {

    @Column(columnName = "id", columnType = "int")
    private int id;

    @Column(columnName = "user_name", columnType = "varchar")
    private String userName;

    @Column(columnName = "age", columnType = "int")
    private int age;

    @Column(columnName = "create_time", columnType = "datetime")
    private Date createTime;

    public UserInfo() {
    }

    public UserInfo(int id, String userName, int age) {
        this.id = id;
        this.userName = userName;
        this.age = age;
    }

    public UserInfo(int id, String userName, int age, Date createTime) {
        this.id = id;
        this.userName = userName;
        this.age = age;
        this.createTime = createTime;
    }


    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", age=" + age +
                ", createTime=" + createTime +
                '}';
    }
}
